package com.djq.hhc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.djq.hhc.mapper.PosCommentMapper;
import com.djq.hhc.model.post.PostComment;
import com.djq.hhc.service.PostCommentService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: dadd7
 * @Date: 2024/05/03/下午 4:28
 * @Description:
 */

@Service
public class PostCommentServiceImpl extends ServiceImpl<PosCommentMapper, PostComment> implements PostCommentService {
    @Override
    public List<PostComment> getCommentsByPostId(Long id) {
        return query().eq("post_id", id).orderByDesc().list();
    }
}
